package com.wyz.socket.core.api.dispatcher;

import com.wyz.socket.core.api.Receiver;
import com.wyz.socket.core.base.packet.AbstractReceivePacket;

/**
 * ioargs -> packet
 */
public interface ReceiveDispatcher extends Dispatcher {

    void start() ;

    void stop() ;

    interface ReceiveCallback{

        AbstractReceivePacket<?, ?> onArriyedNewPacket(byte type , int length, byte[] headerInfo) ;

        void onReceivePacketComplated(AbstractReceivePacket<?,?> packet, boolean isSucceed);

        void onReceivedHeartbeat() ;

    }
}
